package cn.zshprint.serein.config;

import org.elasticsearch.client.Client;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;

/**
 * @Description: 将自定义的converter注入到ElasticsearchTemplate
 * @Author: Jonas
 * @Date: 2020-04-16 11:44
 */
@Configuration
public class EsConfig {

    @Bean
    public ElasticsearchTemplate elasticsearchTemplate(Client client , ElasticsearchConverter converter){
        return new MyEsTemplate(client,converter);
    }

}

